FROM centos:6
MAINTAINER zxx99 <zxx99@zd04.com>

RUN mkdir -p /code/webroot
RUN chmod 0777 -R /code
WORKDIR /code

RUN rpm -ivh http://dl.fedoraproject.org/pub/epel/6/i386/epel-release-6-8.noarch.rpm
RUN rpm -ivh http://rpms.famillecollet.com/enterprise/remi-release-6.rpm
RUN yum install -y httpd
RUN yum install --enablerepo=epel,remi-php70,remi -y \
                              php \
                              php-cli \
                              php-gd \
                              php-mbstring \
                              php-mcrypt \
                              php-mysqlnd \
                              php-pdo \
                              php-xml \
                              php-xdebug \
                              php-redis
RUN sed -i -e "s|^;date.timezone =.*$|date.timezone = Asia/Shanghai|" /etc/php.ini

ADD ./httpd.conf /etc/httpd/conf.d/mysite.conf

EXPOSE 80
CMD ["/usr/sbin/apachectl", "-D", "FOREGROUND"]

